package com.fxnotes.domain.model;

import java.util.Objects;

public class Page extends NamedEntity {

    public Page(String name) {
        super(name);
    }
    
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Page) {
            Page that = (Page) obj;
            return Objects.equals(this.getName(), that.getName());

        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    @Override
    public String toString() {
        return name;
    }    
}
